using System;
using NHibernate;
using Sample.Domain;

namespace Sample.Service
{
    public class PersonService : Repository<Person>
    {
        public PersonService(ISession session)
            : base(session)
        {
        }

        /// <summary>
        /// Make sure you wrap this in a transaction in your service layer
        /// </summary>
        /// <param name="person"></param>
        public void SaveChanges(Person person)
        {
            base.SaveOrUpdate(person);
        }
    }
}